package cn.wolfcode.crm.query;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class QueryObject {
    private int page = 1;//当前页
    private int rows = 10;//每页多少条

    private String sort;
    private String order;

    public int getStartIndex(){
        return (page - 1) * rows;
    }

    public static String empty(String string){
        if (string == null||"".equals(string.trim()) ) {
            return null;
        }
        return string;
    };
}
